flowchart TD
  subgraph sg0["Main Function"]
    direction TB
    subgraph sg1["If statement 1"]
      direction TB
      n0{"If statement 1"}
      class n0 decisionNode;
      subgraph sg2["If statement 2.1"]
        direction TB
        n1{"If statement 2.1"}
        class n1 decisionNode;
        subgraph sg3["If statement 3.1"]
          direction TB
          n2{"If statement 3.1"}
          class n2 decisionNode;
          n3["True"]
          n4["Third False"]
        end
        subgraph sg4["If statement 3.2"]
          direction TB
          n5{"If statement 3.2"}
          class n5 decisionNode;
          n6["True"]
          n7["Third False"]
        end
      end
      subgraph sg5["If statement 2.2"]
        direction TB
        n8{"If statement 2.2"}
        class n8 decisionNode;
        subgraph sg6["If statement 3.1"]
          direction TB
          n9{"If statement 3.1"}
          class n9 decisionNode;
          n10["True"]
          n11["Third False"]
        end
        subgraph sg7["If statement 3.2"]
          direction TB
          n12{"If statement 3.2"}
          class n12 decisionNode;
          n13["True"]
          n14["Third False"]
        end
      end
    end
  end
  n2 --> n3
  n2 --> n4
  n5 --> n6
  n5 --> n7
  n1 --> n2
  n1 --> n5
  n9 --> n10
  n9 --> n11
  n12 --> n13
  n12 --> n14
  n8 --> n9
  n8 --> n12
  n0 --> n1
  n0 --> n8
%%__BAML_SPANMAP__={"n0":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":2,"start":4,"end_line":2,"end":23},"n1":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":5,"start":8,"end_line":5,"end":30},"n2":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":7,"start":12,"end_line":7,"end":34},"n3":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":9,"start":16,"end_line":9,"end":26},"n4":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":12,"start":16,"end_line":12,"end":33},"n5":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":18,"start":12,"end_line":18,"end":34},"n6":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":20,"start":16,"end_line":20,"end":26},"n7":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":23,"start":16,"end_line":23,"end":33},"n8":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":31,"start":8,"end_line":31,"end":30},"n9":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":33,"start":12,"end_line":33,"end":34},"n10":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":35,"start":16,"end_line":35,"end":26},"n11":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":38,"start":16,"end_line":38,"end":33},"n12":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":44,"start":12,"end_line":44,"end":34},"n13":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":46,"start":16,"end_line":46,"end":26},"n14":{"file_path":"tests/validation_files/headers/nested_if_statements.baml","start_line":49,"start":16,"end_line":49,"end":33}}
  click n0 call bamlMermaidNodeClick() "Go to source"
  click n1 call bamlMermaidNodeClick() "Go to source"
  click n2 call bamlMermaidNodeClick() "Go to source"
  click n3 call bamlMermaidNodeClick() "Go to source"
  click n4 call bamlMermaidNodeClick() "Go to source"
  click n5 call bamlMermaidNodeClick() "Go to source"
  click n6 call bamlMermaidNodeClick() "Go to source"
  click n7 call bamlMermaidNodeClick() "Go to source"
  click n8 call bamlMermaidNodeClick() "Go to source"
  click n9 call bamlMermaidNodeClick() "Go to source"
  click n10 call bamlMermaidNodeClick() "Go to source"
  click n11 call bamlMermaidNodeClick() "Go to source"
  click n12 call bamlMermaidNodeClick() "Go to source"
  click n13 call bamlMermaidNodeClick() "Go to source"
  click n14 call bamlMermaidNodeClick() "Go to source"